Free Pascal has support for procedural types, although it differs from the Turbo Pascal implementation of them.
The type declaration remains the same. The two following examples are valid type declarations:
Type TOneArg = Procedure (Var X : integer); TNoArg = Function : Real; var proc : TOneArg; func : TNoArg;Given these declarations, the following assignments are valid:
Procedure printit (Var X : Integer); begin writeln (x); end; ... P:=@printit; Func:=@Pi;From this example, the difference with Turbo Pascal is clear: In Turbo Pascal it isn't necessary to use the address operator (@) when assigning a procedural type variable, whereas in Free Pascal it is required.